import * as antd from 'antd';
import {useMyReducer} from './UseMyReducer';
export default function(props){

    const [state, dispatch] = useMyReducer();

    function test(){
        dispatch({type: 'addTest'})
    }
    return (
        <div>
            child state :{
                JSON.stringify(state)
            }
        
            <antd.Divider></antd.Divider>
            <antd.Button type="primary" onClick={test}>test</antd.Button>
            <antd.Divider></antd.Divider>
            <antd.Button type="primary" onClick={()=>{props.ck()}}>test</antd.Button>
        </div>
    )
}